package com.tuo51.evaluate.domain.appusers;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.tuo51.foudation.model.Model;
import lombok.Data;

import javax.persistence.*;

@Data
@Entity
@Table(name = "pay_order")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
public class PayOrder extends Model {

	@Column(name = "user_id")
	private String userId;

	@Column(name = "out_trade_no")
	private String outTradeNo;

	@Column(name = "out_trade_type")
	private Integer outTradeType;

	@Column(name = "product_id")
	private Long productId;

	@JsonIgnore
	@OneToOne
	@JoinColumn(name = "product_id", insertable = false, updatable = false)
	private Vip product;


	@Column(name = "product_name")
	private String productName;

	@Column(name = "pay_object_type", columnDefinition = "int(3) default 0 COMMENT '支付对象类型' ")
	private Integer payObjectType;

	@Column(name = "pay_object_id", columnDefinition = "varchar(10) COMMENT '支付对象id' ")
	private String payObjectId;

	private Integer amount;

	@Column(name = "create_time")
	private java.util.Date createTime;

	@Column(name = "shared_revenue_paid")
	private Boolean sharedRevenuePaied = false;

}
